function edgeInsetsCode(parentData, childData) {
    let code = '';

    let paddingLeft = childData.x - parentData.x;
    let paddingTop = childData.y - parentData.y;
    let paddingRight = parentData.x + parentData.width - childData.x - childData.width;
    let paddingBottom = parentData.y + parentData.height - childData.y - childData.height;

    let paddingHorizon, paddingVertical;

    if (num(paddingLeft) == 0 && num(paddingRight) == 0 && num(paddingTop) == 0 && num(paddingBottom) == 0) {
        return code;
    } else if (Math.abs(paddingLeft - paddingRight) <= 2 && Math.abs(paddingTop - paddingBottom) <= 2) {
        // 使用symmetric
        if (Math.abs(paddingLeft - paddingRight) == 0 && Math.abs(paddingTop - paddingBottom) == 0) {
            return code;
        } else if (Math.abs(paddingLeft - paddingRight) == 0) {
            code = `EdgeInsets.symmetric(vertical: ${unit(Math.min(paddingTop, paddingBottom))})`;
        } else if (Math.abs(paddingTop - paddingBottom) == 0) {
            code = `EdgeInsets.symmetric(horizontal: ${unit(Math.min(paddingLeft, paddingRight))})`;
        } else {
            code = `EdgeInsets.symmetric(horizontal: ${unit(Math.min(paddingLeft, paddingRight))}, vertical: ${unit(Math.min(paddingTop, paddingBottom))})`;
        }
    } else {
        if (directionalSupport) {
            if (paddingLeft > paddingRight) {
                paddingHorizon = `end: ${unit(paddingRight)}`;
            } else if (paddingLeft < paddingRight) {
                paddingHorizon = `start: ${unit(paddingLeft)}`;
            } else {
                paddingHorizon = `start: ${unit(paddingLeft)}, end: ${unit(paddingRight)}`;
            }

            if (paddingTop > paddingBottom) {
                paddingVertical = `bottom: ${unit(paddingBottom)}`;
            } else if (paddingTop < paddingBottom) {
                paddingVertical = `top: ${unit(paddingTop)}`;
            } else {
                paddingVertical = `top: ${unit(paddingTop)}, bottom: ${unit(paddingBottom)}`;
            }

            code = `EdgeInsetsDirectional.only(${paddingHorizon}, ${paddingVertical})`;
        } else {
            if (paddingLeft > paddingRight) {
                paddingHorizon = `right: ${unit(paddingRight)}`;
            } else if (paddingLeft < paddingRight) {
                paddingHorizon = `left: ${unit(paddingLeft)}`;
            } else {
                paddingHorizon = `left: ${unit(paddingLeft)}, right: ${unit(paddingRight)}`;
            }

            if (paddingTop > paddingBottom) {
                paddingVertical = `bottom: ${unit(paddingBottom)}`;
            } else if (paddingTop < paddingBottom) {
                paddingVertical = `top: ${unit(paddingTop)}`;
            } else {
                paddingVertical = `top: ${unit(paddingTop)}, bottom: ${unit(paddingBottom)}`;
            }

            code = `EdgeInsets.only(${paddingHorizon}, ${paddingVertical})`;
        }
    }

    return code;
}